<template>
  <ms-block-tip title="条件搜索">
    <el-form :inline="true" :model="searchForm">
      <el-form-item label="学生姓名" prop="name">
        <el-input v-model="searchForm.name" />
      </el-form-item>
      <el-form-item label="性别" prop="sex">
        <ms-dict dict-type="sex" v-model="searchForm.sex" />
      </el-form-item>
      <el-form-item label="生日" prop="beforeBirthday">
        <ms-date-picker v-model="searchForm.beforeBirthday" />
      </el-form-item>
      <el-form-item label="~" prop="afterBirthday">
        <ms-date-picker v-model="searchForm.afterBirthday" />
      </el-form-item>
      <el-form-item>
        <el-button size="small" type="success" @click="$emit('search', searchForm)">查询</el-button>
        <el-button size="small" type="primary" @click="$emit('add')" v-permission="['studentTest:save']">添加</el-button>
      </el-form-item>
    </el-form>
  </ms-block-tip>
</template>

<script>
import MsBlockTip from '@/common/blockTip'
import MsDict from '@/common/dict/components'
import MsDatePicker from '@/common/datePicker'
export default {
  components: {
    MsBlockTip,
    MsDict,
    MsDatePicker
  },
  data() {
    return {
      searchForm: {}
    }
  }
}
</script>

<style lang="stylus" scoped>
  @import '~@/assets/style/search.stylus'
</style>
